<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ include file="header.jsp" %>
<center>
    <hr/>
    <img src='images/top.jpg' width='100%' height='120px'>
    <hr/>
</center>

<br/>
<center><img src='images/u6.png' height=70px><font size='+4' face='楷体'
                                                   color='#7D26CD'><b>新增数据</b></font></center>

<br/>

<hr style=' height:2px;border:none;border-top:2px dotted #185598;'/>
<center>
    <%
        if (request.getAttribute("id") == null) {
            out.println("<form action='addUserTypeServlet' method='post' enctype='multipart/form-data'>");
        }
        out.println("<form action='updateUserTypeServlet?id=" + request.getAttribute("id") + "' method='post' enctype='multipart/form-data' >");

    %>
    <%--    <form action="add" method="post" enctype="multipart/form-data">--%>
    <table>
        <tr>
            <td>
                类型：
            </td>
            <td>
                <% out.println(" <input type='text' name='type' value='" + (request.getAttribute("type") != null ? request.getAttribute("type") : "") + "'/>"); %>
            </td>
        </tr>

        <tr>
            <td colspan="2">
                <br/>
                <%
                    if (request.getAttribute("id") == null) {
                        out.println("<input type='submit' value='新增' style='width:170px;height:30px'/>");
                    } else {
                        out.println("<input type='submit' value='修改' style='width:170px;height:30px'/>");
                    }
                %>

                <input type="reset" value="重置" style="width:170px;height:30px"/>
            </td>
        </tr>

    </table>

    </form>
</center>

<%@ include file="footer.jsp" %>
